<template>
  <div class="about">
    <h1>This is an about page</h1>
    <button @click="sendClick"></button>
    <!-- <p>{{ tittle }}</p> -->
  </div>
</template>
<script>
export default{
  name:"AboutView",
  data(){
     return{
      message:"我是About子级传递过来的数据"
     }
  },
  props:{
    tittle:{
       type:String,  //传递的类型声明
       default:""    //默认值
    }
  },
  created(){
    console.log(this.tittle)
  },
  methods:{
    sendClick(){
      this.$emit("onEvent",this.message)
    }
  }
}
</script>
